﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddUser.aspx.cs" Inherits="Web.admin.User.AddSingle" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="../../css/style.css" rel="stylesheet" type="text/css" />
    <script src="../../js/jquery-1.3.2.min.js" type="text/javascript"></script>
    <script src="../../js/function.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        function CheckEmpty() {
            if ($(".class11").val() == "") {
                alert("用户名称为必填项，不允许为空");
                return false;
            }
            else if ($(".class12").val() == "") {
                alert("密码称为必填项，不允许为空");
                return false;
            }
            else if ($(".class13").val() == "") {
                alert("确认密码称为必填项，不允许为空");
                return false;
            }
            else
                return true;
        }
        function ClearToEmpty() {
            if ($(".class11").val("") && $(".class12").val("") && $(".class13").val("") && $(".txtInput1").val("") && $(".txtInput2").val("") && $(".txtInput3").val("") && $(".txtInput4").val(""))
                return false;
           
       
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="top_div">
        <div class="top_div_left" >
                <table>
                    <tr >
                        <td ><img src="../../images/main_hl.gif" /></td>
                        <td ><img src="../../images/main_hl2.gif" /></td>
                        <td class="topNav"><span>添加用户</span></td>
                        <td><img src="../../images/main_hr.gif" /></td>
                    </tr>
                </table>
        </div>
    </div>

   <div class="middle_div">
        <div class="middle_left"></div>
        <div class="middle_middle">
            <div class="navigation">
                首页&gt;用户管理&gt;添加用户
                <div style="float:right; margin-right:5px;">
                    <a href="ListUser.aspx">返回用户列表>></a>
                </div>
            </div>
            <div class="submitTable">
                <table >
                    <tr>
                        <th>用户名：</th>
                        <td>
                            <asp:TextBox ID="txtUserName" CssClass="class11" runat="server"></asp:TextBox><label>*</label>
                            <input id="txtTeacherId" type="hidden" runat="server" />
                        </td>
                    </tr>
                    <tr id="password" runat="server">
                        <th>密码：</th>
                        <td><asp:TextBox ID="txtPwd" runat="server" CssClass="class12" TextMode="Password"></asp:TextBox><label>*</label></td>
                    </tr>
                    <tr id ="confirm" runat="server">
                        <th>确认密码：</th>
                        <td><asp:TextBox ID="txtConPwd" runat="server"  CssClass="class13" TextMode="Password"></asp:TextBox><label>*</label></td>
                    </tr>
                    <tr>
                        <th>工号：</th>
                        <td><asp:TextBox ID="txtCode" CssClass="txtInput1" runat="server"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <th>姓名：</th>
                        <td><asp:TextBox ID="textBoxName" CssClass="txtInput2" runat="server"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <th>性别：</th>
                        <td>
                            <asp:RadioButtonList ID="listGender" runat="server" 
                                RepeatDirection="Horizontal">
                                <asp:ListItem Selected="True" Value="0">男</asp:ListItem>
                                <asp:ListItem Value="1">女</asp:ListItem>
                            </asp:RadioButtonList>
                        </td>
                    </tr>
                    <tr>
                        <th>联系电话: </th>
                        <td><asp:TextBox ID="txtPhone" CssClass="txtInput3" runat="server"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <th>邮箱: </th>
                        <td><asp:TextBox ID="txtEmail" CssClass="txtInput4" runat="server"></asp:TextBox></td>
                    </tr>
                    <tr>
                        <th>所属学院: </th>
                        <td><asp:DropDownList ID="AcademyList"  runat="server" AutoPostBack="true" 
                                AppendDataBoundItems="True" Height="26px" Width="262px" >
                        </asp:DropDownList></td>
                    </tr>
                    <tr>
                        <th>是否学院级竞赛管理员: </th>
                        <td><asp:CheckBox ID="ManagerBox" runat="server"/></td>
                    </tr>
                    <tr>
                        <th>角色: </th>
                        <td>
                            <asp:CheckBoxList ID="RoleList" runat="server">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btn_Save" OnClientClick="return CheckEmpty();" runat="server" 
                                Text="保存"  CssClass="btn_submit" onclick="btn_Save_Click" Height="31px" 
                                Width="88px" />
                        </td>
                        <td>
                            <asp:Button ID="btn_Reset" OnClientClick="return ClearToEmpty();" runat="server" Text="重置"  CssClass="btn_reset"/>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="middle_right"></div>
    </div>
    </form>
</body>
</html>
